package com.industrial.operation.service.impl;

import java.util.List;

import com.industrial.common.core.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.industrial.operation.mapper.OperationEconomicMapper;
import com.industrial.operation.domain.OperationEconomic;
import com.industrial.operation.service.IOperationEconomicService;

/**
 * 各市经济运行Service业务层处理
 * 
 * @author Zhou_S
 * @date 2024-01-17
 */
@Service
public class OperationEconomicServiceImpl implements IOperationEconomicService 
{
    @Autowired
    private OperationEconomicMapper operationEconomicMapper;

    /**
     * 查询各市经济运行
     * 
     * @param baseId 各市经济运行主键
     * @return 各市经济运行
     */
    @Override
    public OperationEconomic selectOperationEconomicByBaseId(String baseId)
    {
        return operationEconomicMapper.selectOperationEconomicByBaseId(baseId);
    }

    /**
     * 查询各市经济运行列表
     * 
     * @param operationEconomic 各市经济运行
     * @return 各市经济运行
     */
    @Override
    public List<OperationEconomic> selectOperationEconomicList(OperationEconomic operationEconomic)
    {
        return operationEconomicMapper.selectOperationEconomicList(operationEconomic);
    }

    /**
     * 新增各市经济运行
     * 
     * @param operationEconomic 各市经济运行
     * @return 结果
     */
    @Override
    public int insertOperationEconomic(OperationEconomic operationEconomic)
    {
        operationEconomic.setBaseId(IdUtils.simpleUUID());
        return operationEconomicMapper.insertOperationEconomic(operationEconomic);
    }

    /**
     * 修改各市经济运行
     * 
     * @param operationEconomic 各市经济运行
     * @return 结果
     */
    @Override
    public int updateOperationEconomic(OperationEconomic operationEconomic)
    {
        return operationEconomicMapper.updateOperationEconomic(operationEconomic);
    }

    /**
     * 批量删除各市经济运行
     * 
     * @param baseIds 需要删除的各市经济运行主键
     * @return 结果
     */
    @Override
    public int deleteOperationEconomicByBaseIds(String[] baseIds)
    {
        return operationEconomicMapper.deleteOperationEconomicByBaseIds(baseIds);
    }

    /**
     * 删除各市经济运行信息
     * 
     * @param baseId 各市经济运行主键
     * @return 结果
     */
    @Override
    public int deleteOperationEconomicByBaseId(String baseId)
    {
        return operationEconomicMapper.deleteOperationEconomicByBaseId(baseId);
    }

    @Override
    public List<OperationEconomic> groupMonth(String yearMonth) {

        return operationEconomicMapper.groupMonth(yearMonth);
    }

    @Override
    public List<OperationEconomic> groupRegion(String yearMonth) {

        return operationEconomicMapper.groupRegion(yearMonth);
    }
}
